using System;
using System.Collections.Generic;
using System.Linq;

namespace Corelib.Entities
{
	[Table(Name = "dbo.TransactionModes")]
	public class TransactionMode
	{

		#region Private Data Members

		private int  _transactionModeID;
		private string  _transactionModeName;

		#endregion

		#region Private "Static" Data Members

		private static readonly string[] _propertyNames = new string[] {
			"TransactionModeID",
			"TransactionModeName",
		};

		#endregion

		#region Constants

		public const int 
			FieldTransactionModeIDIdx = 0,
			FieldTransactionModeNameIdx = 1;

		#endregion

		#region Private instance data members

		private FieldInfo[] _fieldInfo = new FieldInfo[]{
			new FieldInfo(FieldTransactionModeIDIdx,FieldType.Primitive),
			new FieldInfo(FieldTransactionModeNameIdx,FieldType.Primitive),
		};

		#endregion

		#region Public Properties

		[Column(DBType = "int not null")]
		public int TransactionModeID
		{
			get { return this.GetHelper(_fieldInfo, _propertyNames, FieldTransactionModeIDIdx,  _transactionModeID); }
			set {  _transactionModeID = this.SetValueTypeHelper(_fieldInfo, FieldTransactionModeIDIdx,  _transactionModeID, value,  _transactionModeID == value); }
		}

		[Column(DBType = "nvarchar(20) not null")]
		public string TransactionModeName
		{
			get { return this.GetHelper(_fieldInfo, _propertyNames, FieldTransactionModeNameIdx,  _transactionModeName); }
			set {  _transactionModeName = this.SetValueTypeHelper(_fieldInfo, FieldTransactionModeNameIdx,  _transactionModeName, value,  _transactionModeName == value); }
		}

		#endregion
	}
}
